package com.example.validator.blankOrEmptyAllowed;

//import jakarta.validation.Constraint;
//import jakarta.validation.Payload;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Documented
@Constraint(validatedBy = BlankAndEmptyValidator.class)
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
public @interface BlankAndEmpty {
    String message() default "字段必须是null或者是空字符串";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}